3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to manage a view's attribute set.
You can use the Q3View_GetDefaultAttributeSet function to get the default attribute set associated with a view.
TQ3Status Q3View_GetDefaultAttributeSet (
TQ3ViewObject view,
TQ3AttributeSet *attributeSet);
The Q3View_GetDefaultAttributeSet function returns, in the attributeSet parameter, the default attribute set of the view specified by the view parameter. QuickDraw 3D supplies a default set of attributes for every view so that you can safely render a view without having to set a value for each attribute. The default attribute values are defined by constants:
#define kQ3ViewDefaultAmbientCoefficient1.0
#define kQ3ViewDefaultDiffuseColor 0.5, 0.5, 0.5
#define kQ3ViewDefaultSpecularColor 0.5, 0.5, 0.5
#define kQ3ViewDefaultSpecularControl 4.0
#define kQ3ViewDefaultTransparency 1.0, 1.0, 1.0
#define kQ3ViewDefaultHighlightColor 1.0, 0.0, 0.0
#define kQ3ViewDefaultSubdivisionMethod kQ3SubdivisionMethodScreenSpace
#define kQ3ViewDefaultSubdivisionC1 20.0
#define kQ3ViewDefaultSubdivisionC2 20.0
You can use the Q3View_SetDefaultAttributeSet function to set the default attribute set associated with a view.
TQ3Status Q3View_SetDefaultAttributeSet (
TQ3ViewObject view,
TQ3AttributeSet attributeSet);
You can use the Q3View_GetAttributeSetState function to get the current attribute set associated with a view.
TQ3Status Q3View_GetAttributeSetState (
TQ3ViewObject view,
TQ3AttributeSet *attributeSet);
You can use the Q3View_GetAttributeState function to get the state of a view's attribute.
TQ3Status Q3View_GetAttributeState (
TQ3ViewObject view,
TQ3AttributeType attributeType,
void *data);
The Q3View_GetAttributeState function returns, in the data parameter, a pointer to the attribute data associated with the attribute type specified by the attributeType parameter in the attribute set of the view specified by the view parameter. If the value NULL is returned in the data parameter, there is no attribute of the specified type in the view's attribute set.
Previous | QD3D Book | Overview | Chapter Contents | Next |